package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.CurrencyExchangeMapper;
import com.education.wisdom.pojo.CurrencyExchange;
import com.education.wisdom.service.ICurrencyExchangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 币兑换 服务层实现
 * 
 * @author ruoyi
 * @date 2019-01-26
 */
@Service
public class CurrencyExchangeServiceImpl implements ICurrencyExchangeService
{
	@Autowired
	private CurrencyExchangeMapper currencyExchangeMapper;

	/**
     * 查询币兑换信息
     * 
     * @param id 币兑换ID
     * @return 币兑换信息
     */
    @Override
	public CurrencyExchange selectCurrencyExchangeById(Integer id)
	{
	    return currencyExchangeMapper.selectCurrencyExchangeById(id);
	}
	
	/**
     * 查询币兑换列表
     * 
     * @param currencyExchange 币兑换信息
     * @return 币兑换集合
     */
	@Override
	public List<CurrencyExchange> selectCurrencyExchangeList(CurrencyExchange currencyExchange)
	{
	    return currencyExchangeMapper.selectCurrencyExchangeList(currencyExchange);
	}
	
    /**
     * 新增币兑换
     * 
     * @param currencyExchange 币兑换信息
     * @return 结果
     */
	@Override
	public int insertCurrencyExchange(CurrencyExchange currencyExchange)
	{
	    return currencyExchangeMapper.insertCurrencyExchange(currencyExchange);
	}
	
	/**
     * 修改币兑换
     * 
     * @param currencyExchange 币兑换信息
     * @return 结果
     */
	@Override
	public int updateCurrencyExchange(CurrencyExchange currencyExchange)
	{
	    return currencyExchangeMapper.updateCurrencyExchange(currencyExchange);
	}

	/**
     * 删除币兑换对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteCurrencyExchangeByIds(String ids)
	{
		return currencyExchangeMapper.deleteCurrencyExchangeByIds(Convert.toStrArray(ids));
	}
	
}
